package com.shop.web;

import com.shop.pojo.User;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpSession;

@RestController
@RequestMapping("user")
public class UserController {
    @RequestMapping("find")
    public User find(HttpSession session){
        User user = (User) session.getAttribute("user");
        return user;
    }
}